<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        button {
            background-color: red;
            width: 100px;
            height: 100px;
            color: white;
        }
    </style>
    <title>Document</title>
</head>

<body>
    <button>我是一个按钮</button>
    <script>
        document.querySelector('button').onclick = function () {
            console.log('摸摸大，滚犊子')
        }
    </script>
</body>

</html>